import Login from '../views/login/index.vue'
import refresh from '../views/layout/refresh.vue'
import Home from '../views/layout/Home.vue'
//会员管理
import MembersList from '../views/Members/Members/list.vue'
//等级管理
import GradeList from '../views/Members/Grade/list.vue'
//商户管理
import SellerList from '../views/Seller/Seller/list.vue'
import IntegrationList from '../views/Seller/Integration/list.vue'
import SellerDetail from '../views/Seller/Seller/detail.vue'
import SellerIntegrationDetail from '../views/Seller/Integration/detail.vue'
import SellerServiceList from '../views/Seller/Service/list.vue'
import SellerServiceDetail from '../views/Seller/Service/detail.vue'
//会员详情
import MembersDetail from '../views/Members/Members/detail.vue'
//服务管理
import ServiceList from '../views/Service/list.vue'
//评论管理
import CommentSellerList from '../views/Comment/Seller/list.vue'
import CommentSellerDetail from '../views/Comment/Seller/detail.vue'
import CommentServiceList from '../views/Comment/Service/list.vue'
import CommentServiceDetail from '../views/Comment/Service/detail.vue'
//订单管理
import OrderList from '../views/Order/list.vue'
import OrderDetail from '../views/Order/detail.vue'
//财务管理
import FinanceOrderTotal from '../views/Finance/OrderTotal/list.vue'
import FinanceOrderRefund from '../views/Finance/OrderRefund/list.vue'
import FinanceSellerList from '../views/Finance/Seller/list.vue'
import FinanceSellerDetail from '../views/Finance/Seller/detail.vue'
import FinanceUsersList from '../views/Finance/Users/list.vue'
import FinanceUsersDetail from '../views/Finance/Users/detail.vue'
import FinanceSellerWithDrawList from '../views/Finance/SellerWithDraw/list.vue'
import FinanceSellerWithDrawDetail from '../views/Finance/SellerWithDraw/detail.vue'
import FinanceUsersWithDrawList from '../views/Finance/UsersWithDraw/list.vue'
import FinanceUsersWithDrawDetail from '../views/Finance/UsersWithDraw/detail.vue'
import FinanceNotifiactionText from '../views/Finance/NotificationText/list.vue'
import FinanceRechargeIntegralDetail from '../views/Finance/Recharge/Integral/detail.vue'
import FinanceRechargeIntegralList from '../views/Finance/Recharge/Integral/list.vue'
import FinanceRechargeUnderLineDetail from '../views/Finance/Recharge/UnderLine/detail.vue'
import FinanceRechargeUnderLineList from '../views/Finance/Recharge/UnderLine/list.vue'
//文章管理
import ArticlePlatformList from '../views/Article/Platform/list.vue'
import ArticlePlatformPublish from '../views/Article/Platform/Publish.vue'
import ArticleSellerList from '../views/Article/Seller/list.vue'
import ArticleSellerDetail from '../views/Article/Seller/Detail.vue'
import ArticleUserList from '../views/Article/User/list.vue'
import ArticleUserDetail from '../views/Article/User/Detail.vue'

//车险管理
import CarInsuranceList from '../views/CarInsurance/list.vue'
//洗车卡管理
import WashCarCardList from '../views/WashCarCard/list.vue'
import WashCarCardListChild from '../views/WashCarCard/CarList/list.vue'
import WashCarCardDetail from '../views/WashCarCard/CarList/CarDetail/list.vue'
//客服管理
import CustomServiceList from '../views/CustomService/list.vue'
//商家活动管理
import SellerActivityList from '../views/SellerActivity/list.vue'
//模块管理
import ModuleCategoryAllList from '../views/Module/Category/AllCategory/list.vue'
import ModuleCategoryServer from '../views/Module/Category/AllCategory/serviceCategory.vue'
import ModuleCategoryHomePageList from '../views/Module/Category/HomePageCategory/list.vue'
import ModuleBannerList from '../views/Module/Banner/list.vue'
import ModuleActivityList from '../views/Module/Activity/list.vue'
import ModuleGuideList from '../views/Module/Guide/list.vue'
//其他管理
import OtherShareList from '../views/Other/Share/list.vue'
import OtherShareDetail from '../views/Other/Share/detail.vue'
import OtherGuanZhuList from '../views/Other/GuanZhu/list.vue'
import OtherInviteCode from '../views/Other/inviteCode.vue'
import OtherQianDao from '../views/Other/QianDao/qianDao.vue'
import OtherQianDaoDetail from '../views/Other/QianDao/detail.vue'
import AiCheShengRiHui from '../views/Other/AiChe/aiCheShengRiHui.vue'
import AiCheDetail from '../views/Other/AiChe/detail.vue'
import YouHuiQuan from '../views/Other/YouHuiQuan/youHuiQuan.vue'
import DefaultPic from '../views/Other/defaultPic.vue'
//系统设置
import SystemRuleList from '../views/System/Rule/list.vue'
import SystemSysInfo from '../views/System/sysInfo.vue'
import SystemAccountSet from '../views/System/accountSet.vue'
import SystemKeyWordSet from '../views/System/KeyWordSet.vue'
import SystemAccountLoginLog from '../views/System/loginLog.vue'
/**
 * meta参数解析
 * hideLeft: 是 否隐藏左侧菜单，单页菜单为true
 * module: 菜单所属模块
 * menu: 所属菜单，用于判断三级菜单是否显示高亮，如菜单列表、添加菜单、编辑菜单都是'menu'，用户列表、添加用户、编辑用户都是'user'，如此类推
 */

const routes = [{
		path: '/',
		redirect: '/cms/home'
	},
	{
		path: '/cms/login',
		component: Login
	},
	{
		path: '/cms/home',
		component: Home,
		children: [{
			path: '/refresh',
			component: refresh,
			name: 'refresh'
		}]
	},
	{
		path: '/cms/Members',
		component: Home,
		name: '会员管理',
		meta: {
			moduleName: '会员'
		},
		children: [{
				path: 'Members/list',
				component: MembersList,
				name: '会员列表',
				meta: {
					hideLeft: false,
					module: 'Members',
					menu: 'members'
				}
			},
			{
				path: 'Members/detail/:id',
				component: MembersDetail,
				name: '用户详情',
				meta: {
					hideLeft: false,
					module: 'Members',
					menu: 'members'
				}
			},
			{
				path: 'Grade/list',
				component: GradeList,
				name: '等级列表',
				meta: {
					hideLeft: false,
					module: 'Grade',
					menu: 'grade'
				}
			}
		]
	},
	{
		path: '/cms/Seller',
		component: Home,
		name: '商户管理',
		meta: {
			moduleName: '商户'
		},
		children: [{
				path: 'Seller/list',
				component: SellerList,
				name: '商户列表',
				meta: {
					hideLeft: false,
					module: 'Seller',
					menu: 'seller'
				}
			},
			{
				path: 'Integration/list',
				component: IntegrationList,
				name: '积分列表',
				meta: {
					hideLeft: false,
					module: 'Seller',
					menu: 'seller'
				}
			},
			{
				path: 'detail/:id',
				component: SellerDetail,
				name: '商户详情',
				meta: {
					hideLeft: false,
					module: 'Seller',
					menu: 'seller'
				}
			},
			{
				path: 'IntegrationDetail/:id',
				component: SellerIntegrationDetail,
				name: '商户积分详情',
				meta: {
					hideLeft: false,
					module: 'Seller',
					menu: 'seller'
				}
			},
			{
				path: 'SellerServiceList/:id',
				component: SellerServiceList,
				name: '单商户服务列表',
				meta: {
					hideLeft: false,
					module: 'Seller',
					menu: 'seller'
				}
			},
			{
				path: 'SellerServiceDetail/:id',
				component: SellerServiceDetail,
				name: '单商户服务详情',
				meta: {
					hideLeft: false,
					module: '商户',
					menu: '商户'
				}
			},
		]
	},
	{
		path: '/cms/service',
		component: Home,
		name: '服务管理',
		meta: {
			moduleName: '服务'
		},
		children: [{
			path: 'list',
			component: ServiceList,
			name: '服务列表',
			meta: {
				hideLeft: false,
				module: 'Service',
				menu: 'service'
			}
		}, ]
	},
	{
		path: '/cms/comment',
		component: Home,
		name: '评论管理',
		meta: {
			moduleName: '评论'
		},
		children: [{
				path: 'seller/list',
				component: CommentSellerList,
				name: '店铺评论列表',
				meta: {
					hideLeft: false,
					module: 'Service',
					menu: 'service'
				}
			},
			{
				path: 'seller/detail/:id',
				component: CommentSellerDetail,
				name: '店铺评论详情',
				meta: {
					hideLeft: false,
					module: 'Service',
					menu: 'service'
				}
			},
			{
				path: 'service/list',
				component: CommentServiceList,
				name: '服务评论列表',
				meta: {
					hideLeft: false,
					module: 'Service',
					menu: 'service'
				}
			},
			{
				path: 'service/detail/:id',
				component: CommentServiceDetail,
				name: '服务评论详情',
				meta: {
					hideLeft: false,
					module: 'Service',
					menu: 'service'
				}
			},
		]
	},
	{
		path: '/cms/order',
		component: Home,
		name: '订单管理',
		meta: {
			moduleName: '订单'
		},
		children: [{
			path: 'list',
			component: OrderList,
			name: '订单列表',
			meta: {
				hideLeft: false,
				module: 'OrderList',
				menu: 'orderlist'
			}
		}, {
			path: 'detail',
			component: OrderDetail,
			name: '订单详情',
			meta: {
				hideLeft: false,
				module: 'OrderList',
				menu: 'orderlist'
			}
		}]
	},
	{
		path: '/cms/finance',
		component: Home,
		name: '财务管理',
		meta: {
			moduleName: '财务'
		},
		children: [{
				path: 'seller/list',
				component: FinanceSellerList,
				name: '商家财务管理列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'seller/detail:id',
				component: FinanceSellerDetail,
				name: '商家财务管理详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'users/list',
				component: FinanceUsersList,
				name: '用户财务管理列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'users/detail:id',
				component: FinanceUsersDetail,
				name: '用户财务管理详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'sellerwithdraw/list',
				component: FinanceSellerWithDrawList,
				name: '商家提现列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'sellerwithdraw/detail:id',
				component: FinanceSellerWithDrawDetail,
				name: '商家提现详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'userswithdraw/list',
				component: FinanceUsersWithDrawList,
				name: '用户提现列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'userswithdraw/detail:id',
				component: FinanceUsersWithDrawDetail,
				name: '用户提现详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'ordertotal',
				component: FinanceOrderTotal,
				name: '订单统计',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'orderrefund',
				component: FinanceOrderRefund,
				name: '订单退款',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}, {
				path: 'notifiactiontext',
				component: FinanceNotifiactionText,
				name: '提现通知',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'recharge/integral/detail',
				component: FinanceRechargeIntegralDetail,
				name: '积分充值详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'recharge/integral/list',
				component: FinanceRechargeIntegralList,
				name: '积分充值记录',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'recharge/underline/list',
				component: FinanceRechargeUnderLineList,
				name: '线下红包充值记录',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'recharge/underline/detail',
				component: FinanceRechargeUnderLineDetail,
				name: '线下红包充值详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}
		]
	},
	{
		path: '/cms/article',
		component: Home,
		name: '文章管理',
		meta: {
			moduleName: '文章'
		},
		children: [{
				path: 'platform/list',
				component: ArticlePlatformList,
				name: '平台文章列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'platform/publisharticle',
				component: ArticlePlatformPublish,
				name: '平台文章发布',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'seller/list',
				component: ArticleSellerList,
				name: '商家文章列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'seller/detail',
				component: ArticleSellerDetail,
				name: '商家文章详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'user/list',
				component: ArticleUserList,
				name: '用户文章列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'user/detail',
				component: ArticleUserDetail,
				name: '用户文章详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			}
		]
	},
	{
		path: '/cms/carinsurance',
		component: Home,
		name: '车险管理',
		meta: {
			moduleName: '车险管理'
		},
		children: [{
				path: 'list',
				component: CarInsuranceList,
				name: '车险列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},

		]
	},
	{
		path: '/cms/washcarcard',
		component: Home,
		name: '洗车卡管理',
		meta: {
			moduleName: '洗车卡'
		},
		children: [{
				path: 'list',
				component: WashCarCardList,
				name: '所有商铺洗车卡列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'card/list/:id',
				component: WashCarCardListChild,
				name: '单商铺洗车卡列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'card/detail/:id',
				component: WashCarCardDetail,
				name: '单商铺洗车卡详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},

		]
	},
	{
		path: '/cms/customservice',
		component: Home,
		name: '客服管理',
		meta: {
			moduleName: '客服管理'
		},
		children: [{
				path: 'list',
				component: CustomServiceList,
				name: '客服列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},

		]
	},
	{
		path: '/cms/SellerActivity',
		component: Home,
		name: '商家活动管理',
		meta: {
			moduleName: '商家活动'
		},
		children: [{
				path: 'list',
				component: SellerActivityList,
				name: '商家活动列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},

		]
	},
	{
		path: '/cms/module',
		component: Home,
		name: '模块管理',
		meta: {
			moduleName: '模块'
		},
		children: [{
				path: 'category/alllist',
				component: ModuleCategoryAllList,
				name: '商家分类管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'category/server',
				component: ModuleCategoryServer,
				name: '单商家服务管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'category/homepagelist',
				component: ModuleCategoryHomePageList,
				name: '用户首页分类管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'banner/list',
				component: ModuleBannerList,
				name: '用户首页banner管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'guide/list',
				component: ModuleGuideList,
				name: '引导页管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'activity/list',
				component: ModuleActivityList,
				name: '首页活动管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},

		]
	},
	{
		path: '/cms/other',
		component: Home,
		name: '其他管理',
		meta: {
			moduleName: '其他'
		},
		children: [{
				path: 'share/list',
				component: OtherShareList,
				name: '其他分享列表',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'share/detail',
				component: OtherShareDetail,
				name: '其他分享详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'guanzhu/list',
				component: OtherGuanZhuList,
				name: '我的关注',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'invitecode',
				component: OtherInviteCode,
				name: '邀请码管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'qiandao',
				component: OtherQianDao,
				name: '签到管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'qddetail',
				component: OtherQianDaoDetail,
				name: '签到详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'aicheshengrihui',
				component: AiCheShengRiHui,
				name: '爱车生日惠',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'aichedetail',
				component: AiCheDetail,
				name: '爱车详情',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'youhuiquan',
				component: YouHuiQuan,
				name: '优惠券',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'defaultpic',
				component: DefaultPic,
				name: '默认图管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
		]
	},
	{
		path: '/cms/system',
		component: Home,
		name: '系统设置',
		meta: {
			moduleName: '系统'
		},
		children: [{
				path: 'rule/list',
				component: SystemRuleList,
				name: '权限管理',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'sysinfo',
				component: SystemSysInfo,
				name: '系统信息',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'accountset',
				component: SystemAccountSet,
				name: '账号设置',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'keywordset',
				component: SystemKeyWordSet,
				name: '关键词设置',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},
			{
				path: 'loginlog',
				component: SystemAccountLoginLog,
				name: '登录日志',
				meta: {
					hideLeft: false,
					module: 'OrderList',
					menu: 'orderlist'
				}
			},

		]
	},
]
export default routes